<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>修改影厅</title>
<link href="../img/base.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/jquery-1.8.2.min.js"></script>
<script language="javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<script language="javascript">	
	function checkHallId(cinemaid){
		var hall_id = $.trim($('#hall_id').val());
		$.post('hall.php',{op:'check_hall',mc_cinemaid:cinemaid,hall_id:hall_id},
			function(res){
				var note_obj = $('#hall_note');
				if(res == 1) note_obj.text('√');
				else note_obj.text('影厅编号重复');
			}
		);
	}
	
	function checkSubmit(){
		var hall_id = $.trim($('#hall_id').val());
		var hall_name = $.trim($('#hall_name').val());
		
		if(hall_id == '' || hall_id == null){
			alert('请填写影厅编号');
			return false;
		}
		
		if(hall_name == '' || hall_name == null){
			alert('请填写影厅名称');
			return false;
		}
		
		return true;
	}
</script>
</head>
<body leftmargin='15' topmargin='10' bgcolor="#FFFFFF">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" id="head1" style="border-bottom:1px solid #CCCCCC">
	<tr>
    	<td align='center' valign='top' colspan="2">
            <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA">
                <tr>
                    <td height="26" background="../img/newlinebg3.gif">
                        <table width="98%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td align="right">
                                    <input type='button' class="coolbg np" onClick="location='hall.php?mc_cinemaid=<{$cinemaid}>';" value='返回' />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
    	<td>
        	<table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr bgcolor="#FFFFFF">
                    <td height="4"></td>
                </tr>
            </table>
        </td>
    </tr>
  	<tr>
    	<td colspan="2">
      		<table width="800" border="0" cellpadding="0" cellspacing="0">
        		<tr>
          			<td width="84" height="24" align="center" background="../img/itemnote1.gif">&nbsp;<{if $action == 'add'}>添加<{else}>修改<{/if}>影厅&nbsp;</td>
          			<td width="84"></td>
          			<td>&nbsp;</td>
        		</tr>
      		</table>
    	</td>
	</tr>
</table>
<form name="form1" action="" enctype="multipart/form-data" method="post" onSubmit="return checkSubmit()">
<table width="98%"  border="0" align="center" cellpadding="2" cellspacing="2" id="needset">
  	<tr>
    	<td height="24" colspan="4" class="bline">
      		<table width="800" border="0" cellspacing="0" cellpadding="0">
        		<tr>
          			<td width="90">&nbsp;影院编号：</td>
          			<td width="35%"><{$cinemaid}></td>
                    <td width="90">&nbsp;影厅编号：</td>
          			<td width="35%"><input type="text" name="hall_id" id="hall_id" <{if $action == 'update'}>disabled="disabled"<{/if}> onblur="checkHallId(<{$cinemaid}>)" value="<{$hall_info.hall_id}>" />&nbsp;<span id="hall_note" style="color:#F00"></span></td>
        		</tr>
      		</table>      
    	</td>
  	</tr>
    <tr>
    	<td height="24" colspan="4" class="bline">
      		<table width="800" border="0" cellspacing="0" cellpadding="0">
                <tr>
               	 	<td width="90">&nbsp;名称：</td>
          			<td width="35%"><input type="text" name="hall_name" id="hall_name" value="<{$hall_info.hall_name}>" /></td>
          			<td width="90">&nbsp;VIP：</td>
          			<td width="35%">
                    	<input type="radio" name="is_vip" value="0" <{if $hall_info.is_vip == 0}>checked="checked"<{/if}>>否</input> 
                    	<input type="radio" name="is_vip" value="1" <{if $hall_info.is_vip == 1}>checked="checked"<{/if}>>是</input>
                    </td>
        		</tr>
      		</table>      
    	</td>
  	</tr>
    <tr>
    	<td height="24" colspan="4" class="bline">
      		<table width="800" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="90">&nbsp;状态：</td>
          			<td width="35%">
                    	<select name="status" id="status">
                        	<option value="1" <{if $hall_info.status == 1}>selected="selected"<{/if}>>启用</option>
                        	<option value="0" <{if $hall_info.status == 0}>selected="selected"<{/if}>>禁用</option>
                        </select>
                    </td>
                    <td width="90">&nbsp;</td>
          			<td width="35%">&nbsp;</td>
        		</tr>
      		</table>      
    	</td>
  	</tr>
</table>

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
    	<td height="56">
			<table width="98%" border="0" cellspacing="1" cellpadding="1">
        		<tr>
          			<td align="center">
          				<table width="214" border="0" cellspacing="0" cellpadding="0" >
              				<tr>
				                <td width="115">
                                	<input type="hidden" name="op" value="save" />
                                	<input type="hidden" name="mc_cinemaid" value="<{$cinemaid}>" />
                                    <input type="hidden" name="action" value="<{$action}>" />
				                    <input name="imageField" type="image" src="../img/button_ok.gif" width="60" height="22" class="np" border="0"  style="cursor:pointer; ">
				                </td>
				                <td width="99">
				                	<img src="../img/button_reset.gif" width="60" height="22" border="0" onClick="location.reload();" style="cursor:pointer; ">
				                </td>
			              	</tr>
						</table>
					</td>
    			</tr>
			</table>
		</td>
	</tr>
</table>
</form>
</body>

</html>